import * as API from '@/api/common/index.js'

export async function getpriceAPI(params) {              //获取定价管理数据
    return  await API.GET("/v1/flash/pricings",params)
};
export async function addpriceAPI(params) {              //获取新增定价管理数据
    return  await API.POST("/v1/flash/pricings",params)
};
export async function editpriceAPI(params) {              //获取修改定价管理数据
    return  await API.PUT("/v1/flash/pricings",params)
};
export async function delpriceAPI(params) {              //获取修改定价管理数据
    return  await API.DELETE("/v1/flash/pricings",params)
};

export async function deletePriceAPI(params) {              //删除定价管理数据
    return  await API.DELETE("/v1/flash/pricings",params)
};

export async function getserviceAPI(params) {              //获取服务管理数据
    return  await API.GET("/v1/flash/services",params)
};
export async function addserviceAPI(params) {              //获取服务管理数据
    return  await API.POST("/v1/flash/services",params)
};
export async function editserviceAPI(params) {              //获取服务管理数据
    return  await API.PUT("/v1/flash/services",params)
};

export async function getpriceSeeAPI(params) {              //获取定价管理数据
    return  await API.GET("/v1/flash/pricings/details",params)
};
export async function getfaultAPI(params) {              //获取定价管理数据
    return  await API.GET("/v1/flash/breakdowns",params)    
};

export async function getFaultData(no) {              //通过设备编号查询详情数据
    return  await API.GET("/v1/flash/equipments/no/"+no)    
};
export async function getOrderData(no) {              //通过订单编号查询详情数据
    return  await API.GET("/v1/flash/orders/no/"+no)    
};

export async function addfault(params) {              //添加故障
    return  await API.POST("/v1/flash/breakdowns/custom",params)    
};

export async function checkfault(params) {              //查询故障
    return  await API.GET("/v1/flash/breakdowns/details/"+params)    
};
export async function Editfault(params) {              //修改故障
    return  await API.PUT("/v1/flash/breakdowns",params)    
};

export async function checkproposal(params) {              //修改故障
    return  await API.GET("/v1/flash/suggests",params)    
};

export async function exportFault(params) {              //通信模块管理页面到处表格
    return  await API.GET("/v1/flash/breakdowns/template/export",params,"blob")
};